<?
if(isset($_GET['debug'])) {
	error_reporting(-1);
	$debug = array('time' => microtime(1));
};

header("Content-Type: text/html; charset=UTF-8");

include('core.php');

$_ = new Motorchk();
echo $_->build();

if(isset($_GET['debug'])) {
	echo '<style>';
	echo '.debug {
		position: absolute;
		top: 0; right: 0;
		padding: 5px;
		background: lightgrey;
		font-size: 10px; font-family: Arial;
		opacity: 0.7
	}';
	echo '</style>';
	echo '<div class="debug">Generation time: ';
	echo (round(microtime(1) - $debug['time'], 3) * 1000);
	echo ' msecs<br /><br />'.implode('<br />', $_->LOG).'</div>';
};
